package com.grad.why.studentsystem;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

@Configuration
@EnableAsync
    public class MyWebAppConfiguration extends WebMvcConfigurerAdapter {

    //虚拟路径映射
        @Override
        public void addResourceHandlers(ResourceHandlerRegistry registry) {
            registry.addResourceHandler("/Path/**").addResourceLocations("file:/D:/faces/");
            registry.addResourceHandler("/download/**").addResourceLocations("file:/D:/files/");
            registry.addResourceHandler("/UnknownFaces/**").addResourceLocations("file:/D:/unknowsFaces/");
            super.addResourceHandlers(registry);
        }
    }
